/*
** Copyright (C) 2011 Viens Yann
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef MAINWINDOW_HPP_
# define MAINWINDOW_HPP_

# include <QMainWindow>
# include <QApplication>
# include <QMenu>
# include <QAction>
# include <QTabWidget>
# include <QTimer>
# include "ATab.hpp"
# include "Camera.hpp"
# include "Filters.hpp"


class		MainWindow: public QMainWindow
{
  Q_OBJECT

public:
  MainWindow(QWidget* parent = NULL);
  ~MainWindow();
  QImage*		IplImageToQtImage(IplImage *input);

public slots:
  void			about();
  void			getFrame();
  void			actualTab(int);

private:
  Camera*		_camera;
  Filters*		_filters;
  QTimer*		_timer;

  // Menu
  void			initMenu();
  QMenu*		_file, *_question;
  QAction*		_quit, *_about;

  // Central Zone
  void                  initArea();
  QTabWidget*           _widgets;
  std::vector<ATab*>	_tabs;
  int                   _actualTab;
};

#endif // !MAINWINDOW_HPP_
